package com.adcc.foc.utils;

import org.apache.log4j.Logger;

/**
 * Log
 *
 * @author zhaoke
 * @version 1.0
 * @since 2014-01-20
 */
public final class Log {

    private Log() {
    }

    /**
     * info
     *
     * @param log
     * @param clazz
     */
    public static void info(String log, Class clazz) {
        try {
            Logger.getLogger(clazz).info(log);
        } catch (Exception ex) {
            //throw ex;
        }
    }

    /**
     * info
     *
     * @param log
     * @param className
     */
    public static void info(String log, String className) {
        try {
            Logger.getLogger(className).info(log);
        } catch (Exception ex) {
            //throw ex;
        }
    }

    /**
     * debug
     *
     * @param log
     * @param clazz
     */
    public static void debug(String log, Class clazz) {
        try {
            Logger.getLogger(clazz).debug(log);
        } catch (Exception ex) {
            //throw ex;
        }
    }

    /**
     * debug
     *
     * @param log
     * @param className
     */
    public static void debug(String log, String className) {
        try {
            Logger.getLogger(className).debug(log);
        } catch (Exception ex) {
            //throw ex;
        }
    }

    /**
     * debug
     *
     * @param log
     * @param ex
     * @param clazz
     */
    public static void debug(String log, Exception ex, Class clazz) {
        try {
            Logger.getLogger(clazz).debug(log, ex.fillInStackTrace());
        } catch (Exception exception) {
            //throw exception;
        }
    }

    /**
     * debug
     *
     * @param log
     * @param ex
     * @param className
     */
    public static void debug(String log, Exception ex, String className) {
        try {
            Logger.getLogger(className).debug(log, ex.fillInStackTrace());
        } catch (Exception exception) {
            //throw exception;
        }
    }

    /**
     * error
     *
     * @param log
     * @param clazz
     */
    public static void error(String log, Class clazz) {
        try {
            Logger.getLogger(clazz).error(log);
        } catch (Exception ex) {
            //throw ex;
        }
    }

    /**
     * error
     *
     * @param log
     * @param className
     */
    public static void error(String log, String className) {
        try {
            Logger.getLogger(className).error(log);
        } catch (Exception ex) {
            //throw ex;
        }
    }

    /**
     * error
     *
     * @param log
     * @param ex
     * @param clazz
     */
    public static void error(String log, Exception ex, Class clazz) {
        try {
            Logger.getLogger(clazz).error(log, ex.fillInStackTrace());
        } catch (Exception exception) {
            //throw exception;
        }
    }

    /**
     * error
     *
     * @param log
     * @param ex
     * @param className
     */
    public static void error(String log, Exception ex, String className) {
        try {
            Logger.getLogger(className).error(log, ex.fillInStackTrace());
        } catch (Exception exception) {
            //throw exception;
        }
    }
}
